package LanQiaoCompetition.LanQiaoCompetition2;

public class main {

    public static void main(String args[]){
        int n = 100;
        int[][][] a = new int[6][5][7];
        System.out.println(a);
    }

    /*Fibonacci数列的递推公式为：Fn=Fn-1+Fn-2，其中F1=F2=1。
    现在我们想知道，Fn除以10007的余数是多少。*/
    private static int fibonacci(int n){
        if(n==1 || n==2){
            return 1;
        }
        else {
            return fibonacci(n-1)+fibonacci(n-2);
        }
    }

    //输出n行的杨辉三角
    private static void yangHuiTriangle(int n){
        int[][] numbers = new int[n][n];
        for(int i=0;i<n;i++){
            numbers[i][0] = 1;
        }
        for(int i=0;i<n-1;i++){
            numbers[i][i+1] = 0;
        }
        for (int j=1;j<n;j++){
            for(int k=1;k<j+1;k++){
                numbers[j][k] = numbers[j-1][k]+numbers[j-1][k-1];
            }
        }
        for (int j=0;j<n;j++){
            for(int k=0;k<j+1;k++){
                System.out.print(numbers[j][k]+" ");
            }
            System.out.println();
        }
    }

    private static void test1(int n){
        int a =2;
        int res = 1;
        for(int i=1;i<=n;i++){
            System.out.println(i+":"+res);
            res = res+a;
            a++;
        }
    }

    private static void test2(){
        int year = 0;
        int i=1;
        while (true){
            for(int k=i;k<200;k++){
                year = year+k;
                if(year == 236){
                    break;
                }
            }
            if(year == 236){
                System.out.println(i);
                break;
            }
            i++;
            year = 0;
        }
    }

}
